<template>
    <div id="div_body">
        <div class="swiper-container" style="height: 1.48rem;" >
            <swiper :options="swiperOption" ref="mySwiper">
                <swiper-slide v-for="(tmp_banner,index) in list.banner_list" :key="index">
                    <img style="height:1.48rem;width:3.75rem" :src="tmp_banner.img" />
                </swiper-slide>
                <div class="swiper-pagination"  slot="pagination"></div>
            </swiper>
        </div>

    </div>
</template>

<script>
    import {homeList} from '../../service/httpService'
    import tool from '../../config/mUtil/tool'
    import info from './../../config/info'
    import { Toast ,MessageBox } from 'mint-ui';
    import { swiper, swiperSlide } from 'vue-awesome-swiper'

    export default {
        name: "home",
        data() {
            return {
                swiperOption:{
                    pagination: '.swiper-pagination',
                    loop: true,
                    initialSlide:1,
                    paginationClickable: true,
                    centeredSlides: true,
                    observer: true, //修改swiper自己或子元素时，自动初始化swiper
                    observeParents: true, //修改swiper的父元素时，自动初始化swiper
                    autoplay: 2000,
                    autoplayDisableOnInteraction: false,
                    onTouchEnd:swiper=>{
                        if(Math.abs(swiper.touches.currentX - swiper.touches.startX) < 3) {
                            let i = swiper.realIndex;
                            let url = this.list.banner_list[i].toUrl;
                            window.location.href = url;
                        }
                    }
                },
                list:{},
                train:{},
                destination:{
                    cms_name:"目的地玩乐",
                    destination_list:[]
                },
                hot_sale:{},
                external:[]
            }
        },
        components:{
            swiper,
            swiperSlide
        },
        mounted() {
        },
        methods: {

        }
    }
</script>
<style lang="scss" type="text/scss">
    @import "./../../style/mixin";
    @import "../../../static/css/travel_book.css";
    @import "../../../static/css/swiper.min.css";
    #div_body{
        .swiper-pagination-bullet-active {
            background-color:$colorWhite!important;
        }
        .swiper-pagination-bullet{
            background-color:rgba(255,255,255,0.4);
        }
        .swiper-pagination{
            bottom:20px;
        }
    }
</style>
<style scoped lang="scss" type="text/scss">
    @import "../../style/mixin";
    @import "../../../static/css/ui-base.css";


    .title {
        text-align: center;
        height:0.4rem;
        line-height:1;
        font-size:0.13rem;
    }

    .title_icon1 {
        height:0.12rem;
        width: 0.1rem;
        transform: rotate(180deg);
        margin-right:0.095rem;
    }
    .title_icon2 {
        height:0.12rem;
        width: 0.1rem;
        margin-left:0.095rem;
    }
    .train-content{
        width: 3.75rem;
        height: 1.75rem;
        background-color: #ffffff;
        box-shadow: 0 0 12px 0 rgba(34, 31, 32, 0.02);
        padding-top:0.175rem;
    }
    .train_info{
        width: 1%;
    }
    .radius {
        width: 0.45rem;
        height: 0.45rem;
        background-color: #ffffff;
        /*border-radius: 100%;*/
    }
    .radius img{
        border-radius:0.45rem;
    }
    .radius-active {
        box-shadow:0 0.075rem 0.15rem rgba(0,0,0,0.1);
        transform:translate3d(0, -2px, 0)
    }
    .layer {
        font-family: PingFangSC;
        font-size: 0.12rem;
        margin-top:0.06rem;
        color: #333333;
        line-height: 1;
    }
    .destination {
        width:  3.75rem;
        height: 1.1rem;
        background-color: #ffffff;
        box-shadow: 0 0 12px 0 rgba(34, 31, 32, 0.02);
        padding-top: 0.175rem;
        -webkit-overflow-scrolling:touch;
    }
    .city {
        width: 1.05rem;
        height: 0.75rem;
        /*opacity: 0.7;*/
        /*background-color: #000000;*/
        margin-left:0.1rem;
        position: relative;
    }
    .city_bg {
        width: 1.05rem;
        height: 0.75rem;
        opacity: 0.3;
        background-color: #000000;;
        position: absolute;
        left: 0;
        top: 0;
    }
    .city_name {
        font-size: 0.14rem;
        color: #ffffff;
    }
    .hot_sale {
        padding-top:0.05rem;
        background-color: #ffffff;
    }
    .hot_sale_line {
        height:1.15rem;
        width:3.75rem;
        padding-left:0.1rem;

    }
    .goods_img {
        width: 1rem;
        height: 1rem;
        background-color: #cccccc;
        margin-top: 0.075rem;
        margin-bottom: 0.075rem;
    }
    .goods_contents {
        margin-top:0.075rem;
        margin-left:0.1125rem;
        width:2.5rem;
        border-bottom: 1px solid #dadada;
    }
    .goods_name {
        width: 2.5rem;
        font-family: PingFangSC;
        font-size: 0.13rem;
        line-height: 1.38;
        text-align: left;
        color: #333333;
        text-overflow: ellipsis;/*文字隐藏后添加省略号*/
        white-space: nowrap;/*强制不换行*/
        overflow: hidden;
    }
    .goods_mark {
        margin-top:0.1rem;
    }
    .goods_mark_content {
        width: 0.525rem;
        padding-bottom: 0.01rem;
        padding-top: 0.02rem;
        line-height: 1;
        border-radius: 0.08rem;
        color: #368ff4;
        border: solid 1px #368ff4;
        margin-right: 0.05rem
    }

    .f1 {
        width:0.8rem;
    }
    .f2 {
        width:0.9rem;
    }
    .star {
        width: 0.1rem;
        height: 0.1rem;
        margin: 0.01rem;
        background-repeat:no-repeat;
        background-size:100% 100%
    }
    .goods_contents_font {
        font-family: PingFangSC;
        font-size: 0.11rem;
        line-height: 1.64;
        text-align: left;
        color: #999999;
    }
    .goods_contents_font1 {
        font-family: PingFangSC;
        font-size: 0.11rem;
        line-height: 1.64;
        text-align: left;
        color: #333333;
    }
    .goods_contents_font2 {
        font-family: PingFangSC;
        font-size: 0.19rem;
        font-weight: 500;
        line-height: 1;
        text-align: left;
        color: #f45a36;
    }
    .goods_contents_font3 {
        font-size: 0.12rem;
        font-weight: normal;
        line-height: 1.5;
        color: #f45a36;
    }
    /*webkit内核*/
    .content::-webkit-scrollbar-button    {
        background-color:rgba(0,0,0,0);
    }
    .content::-webkit-scrollbar-track     {
        background-color:rgba(0,0,0,0);
    }
    .content::-webkit-scrollbar-track-piece {
        background-color:rgba(0,0,0,0);
    }
    .content::-webkit-scrollbar-thumb{
        background-color:rgba(0,0,0,0);
    }
    .content::-webkit-scrollbar-corner {
        background-color:rgba(0,0,0,0);
    }
    .content::-webkit-scrollbar-resizer  {
        background-color:rgba(0,0,0,0);
    }
    .content::-webkit-scrollbar {
        display: none;/*隐藏滚轮*/
    }
    /*o内核*/
    .content .-o-scrollbar{
        -moz-appearance: none !important;
        background: rgba(0,255,0,0) !important;
    }
    .content::-o-scrollbar-button    {
        background-color:rgba(0,0,0,0);
    }
    .content::-o-scrollbar-track     {
        background-color:rgba(0,0,0,0);
    }
    .content::-o-scrollbar-track-piece {
        background-color:rgba(0,0,0,0);
    }
    .content::-o-scrollbar-thumb{
        background-color:rgba(0,0,0,0);
    }
    .content::-o-scrollbar-corner {
        background-color:rgba(0,0,0,0);
    }
    .content::-o-scrollbar-resizer  {
        background-color:rgba(0,0,0,0);
    }
    /*IE10,IE11,IE12*/
    .content{
        -ms-scroll-chaining: chained;
        -ms-overflow-style: none;
        -ms-content-zooming: zoom;
        -ms-scroll-rails: none;
        -ms-content-zoom-limit-min: 100%;
        -ms-content-zoom-limit-max: 500%;
        -ms-scroll-snap-type: proximity;
        -ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
        -ms-overflow-style: none;
        overflow: auto;
        overflow-y:hidden;
    }
    .hot_sale_line:last-child > .goods_contents{
        border-bottom: 0px;
    }


</style>
